package com.serialcommunication.helper;

import javax.swing.text.MaskFormatter;

public class FormatUtil {

	public static int getMaxHexSigns (MaskFormatter formatter) {
		String mask = formatter.getMask();
		int retValue = 0;
		char[] array = mask.toCharArray();
		for (int i = 0; i<array.length; i++) {
			if (array[i] == 'H') {
				retValue ++;
			}
		}
		return retValue;
	}
}
